package com.fengzhi.web.controller;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/user", produces = "text/html; charset=UTF-8")
public class UserController {

	public Logger log = Logger.getLogger(getClass());

	@RequestMapping(value = "doLogin")
	@ResponseBody
	public String doLogin(String username, String password) {
		log.info("user do login ");
		log.info("username: " + username);
		log.info("password: " + password);

		return "";
	}

	@RequestMapping(value = "doLogin2")

	public @ResponseBody String doLogin2(@RequestParam(value = "username", defaultValue = "") String username,
			@RequestParam(value = "pwd", defaultValue = "") String password) {
		log.info("user do login2 ");
		log.info("username: " + username);
		log.info("password: " + password);

		return "";
	}
}
